package cn.hicard.auth.entity;

/**
 * MgRoleSourceId entity. @author MyEclipse Persistence Tools
 */

public class MgRoleSourceId implements java.io.Serializable {

	// Fields

	private Integer pkRoleinfo;
	private Integer pkSource;

	// Constructors

	/** default constructor */
	public MgRoleSourceId() {
	}

	/** full constructor */
	public MgRoleSourceId(Integer pkRoleinfo, Integer pkSource) {
		this.pkRoleinfo = pkRoleinfo;
		this.pkSource = pkSource;
	}

	// Property accessors

	public Integer getPkRoleinfo() {
		return this.pkRoleinfo;
	}

	public void setPkRoleinfo(Integer pkRoleinfo) {
		this.pkRoleinfo = pkRoleinfo;
	}

	public Integer getPkSource() {
		return this.pkSource;
	}

	public void setPkSource(Integer pkSource) {
		this.pkSource = pkSource;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof MgRoleSourceId))
			return false;
		MgRoleSourceId castOther = (MgRoleSourceId) other;

		return ((this.getPkRoleinfo() == castOther.getPkRoleinfo()) || (this
				.getPkRoleinfo() != null
				&& castOther.getPkRoleinfo() != null && this.getPkRoleinfo()
				.equals(castOther.getPkRoleinfo())))
				&& ((this.getPkSource() == castOther.getPkSource()) || (this
						.getPkSource() != null
						&& castOther.getPkSource() != null && this
						.getPkSource().equals(castOther.getPkSource())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getPkRoleinfo() == null ? 0 : this.getPkRoleinfo()
						.hashCode());
		result = 37 * result
				+ (getPkSource() == null ? 0 : this.getPkSource().hashCode());
		return result;
	}

}
